"extra byte scans" toggle which scan type
10000002 beq 0, 0,
8f19001c lw t9, $001c(t8)	load bnel t3, t4, $000ffedc, keep if it didn't change.
8f190020 lw t9, $0020(t8)	load beql t3, t4, $000ffedc, keep if it changed
af190000 sw t9, $0000(t8)	store one of them on the 1st line
af000004 sw zero, $0004(t8)	clear unused space
jr ra
ff000008 sd zero, $0008(t8)	clear unused space
10000002 beq 0, 0,
8f190024 lw t9, $0024(t8)	load slt at, t4, t3, keep if it increased
8f190028 lw t9, $0028(t8)	load slt at, t3, t4, keep if it decreased
af190000 sw t9, $0000(t8)	store one of them on the 1st line
8f19002c lw t9, $002c(t8)	load beql at, zero, $000ffedc, the branch for either of them
af19002c sw t9, $0004(t8)	store it on the 2nd line
jr ra
ff000008 sd zero, $0008(t8)	clear unused space
10000006 beq 0, 0,
8f190030 lw t9, $0030(t8)	load sub t3, t4, t3, keep if it increased by signed value amount
10000004 beq 0, 0,
8f190034 lw t9, $0034(t8)	load subu t3, t4, t3, keep if it increased by unsigned value amount
10000002 beq 0, 0,
8f190038 lw t9, $0038(t8)	load sub t3, t3, t4, keep if it decreased by signed value amount
8f19003c lw t9, $003c(t8)	load subu t3, t3, t4, keep if it decreased by unsigned value amount
af190008 sw t9, $0008(t8)	store one of them on the 3rd line
8719001a lh t9, $001a(t8)	load "3c01" for the upper 16 bits of the value
a7190002 sh t9, $0002(t8)	store it on the 1st line
87190018 lh t9, $0018(t8)	load "3421" for the lower 16 bits of the value
a7190006 sh t9, $0006(t8)	store it on the 2nd line
8f190040 lw t9, $0040(t8)	load bnel at, t3, $000ffedc
jr ra
af19000c sw t9, $000c(t8)	store it on the 4th line






"1st scan" toggle which scan type
8f190008 lw t9, $0008(t8)	load bne t2, t3, $000ffe90, store if exact value
af190008 sw t9, $0008(t8)	store it on 3rd line
af00000c sw zero, $000c(t8)	clear unused lines
ff000010 sd zero, $0010(t8)	clear unused lines
10000020 beq 0, 0,
ff000018 sd zero, $0018(t8)	clear unused lines
8f19000c lw t9, $000c(t8)	load beq t2, t3, $000ffe90, store if exact value
af190008 sw t9, $0008(t8)	store it on 3rd line
af00000c sw zero, $000c(t8)	clear unused lines
ff000010 sd zero, $0010(t8)	clear unused lines
1000001a beq 0, 0,
ff000018 sd zero, $0018(t8)	clear unused lines
8f190010 lw t9, $0010(t8)	load slt at, t2, t3, store if greater than
af190008 sw t9, $0008(t8)	store in on 3rd line
8f190018 lw t9, $0018(t8)	load beq at, zero, $000ffe90 for branching if not greater than
af19000c sw t9, $000c(t8)	store it on the 4th line
ff000010 sd zero, $0010(t8)	clear unused lines
10000013 beq 0, 0,
ff000018 sd zero, $0018(t8)	clear unused lines
8f190010 lw t9, $0014(t8)	load slt at, t3, t2, store if greater than
af190008 sw t9, $0008(t8)	store in on 3rd line
8f190018 lw t9, $0018(t8)	load beq at, zero, $000ffe90 for branching if not greater than
af19000c sw t9, $000c(t8)	store it on the 4th line
ff000010 sd zero, $0010(t8)	clear unused lines
1000000c beq 0, 0,
ff000018 sd zero, $0018(t8)	clear unused lines
8f190010 lw t9, $0010(t8)	load slt at, t2, t3, continue on if greater than
af190008 sw t9, $0008(t8)	store it on the 3rd line
8f190014 lw t9, $0014(t8)	load slt at, t3, t2, store if lesser than
af190018 sw t9, $0018(t8)	store it on the 7th line
8f190018 lw t9, $0018(t8)	load beq at, zero, $000ffe90 for branching if not greater than
af19000c sw t9, $000c(t8)	store it on the 4th line
af19001c sw t9, $001c(t8)	store it on the 8th line too
87190002 lh t9, $0002(t8)	load "3c0a" for the upper 16 bits of the 2nd value
a7190012 sh t9, $0012(t8)	store it on the 5th line
87190000 lh t9, $0000(t8)	load "354a" for the lower 16 bits of the 2nd value
a7190016 sh t9, $0016(t8)	store it on the 6th line
87190002 lh t9, $0002(t8)	load "3c0a" for the upper 16 bits of the 1st value
a7190002 sh t9, $0002(t8)	store it on the 1st line
87190000 lh t9, $0000(t8)	load "354a" for the lower 16 bits of the 1st value
jr ra
a7190006 sh t9, $0006(t8)	store it on the 2nd line





toggle whether to switch between getting the address or value in "get addres/value"
10000006 beq 0, 0, down 7
8f190000 lw t9, $0000(t8)	lw t5, $0004(t8), get the address
10000004 beq 0, 0, down 5
8f190000 lw t9, $0004(t8)	lbu t5, $0008(t8), get the 1 byte's value
10000002 beq 0, 0, down 3
8f190000 lw t9, $0008(t8)	lhu t5, $0008(t8), get the 2 bytes' value
8f190000 lw t9, $000c(t8)	lwu t5, $0008(t8), get the 4 bytes' value
03e00008 jr ra
af190000 sw t9, $0000(t8)



Toggle which way to cycle through results
10000002 beq zero, zero, $00100054
8f190000 lw t9, $0000(t8)	addu t7, at, t7, cycle through results up 1
8f190004 lw t9, $0004(t8)	subu t7, at, t7, cycle through results down 1
03e00008 jr ra
af190000 sw t9, $0000(t8)



"extra bit scans" toggle whether to scan for on or off bits
10000002 beq zero, zero, $00100068
8f190000 lw t9, $0000(t8)	bnel t4, zero, $000ffee4, extra bit scans remove if bits aren't off
8f190004 lw t9, $0004(t8)	bnel t2, t4, $000ffee4, extra bit scans remove if bits aren't on
03e00008 jr ra
af190000 sw t9, $0000(t8)



8f190000 lw t9, $0000(t8)	lb t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lb t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lb t4, $0000(t2), extra scan current value
10000005 beq zero, zero, $00100094	go to store byte and increase by 1
8f0d0000 lw t5, $0000(t8)	lb t2, $0008(t8), apply old value
8f190000 lw t9, $0000(t8)	lbu t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lbu t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lbu t4, $0000(t2), extra scan current value
8f0d0000 lw t5, $0000(t8)	lbu t2, $0008(t8), apply old value
8f0c0000 lw t4, $0000(t8)	sb t2, $0000(t5), store byte in apply old value
10000018 beq zero, zero, $001000fc	go to store these results
8f0b0000 lw t3, $0000(t8)	addiu t5, t5, $0001, 1st scan for 1 byte

8f190000 lw t9, $0000(t8)	lh t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lh t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lh t4, $0000(t2), extra scan current value
10000005 beq zero, zero, $00100094	go to store 2 bytes and increase by 2
8f0d0000 lw t5, $0000(t8)	lh t2, $0008(t8), apply old value
8f190000 lw t9, $0000(t8)	lhu t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lhu t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lhu t4, $0000(t2), extra scan current value
8f0d0000 lw t5, $0000(t8)	lhu t2, $0008(t8), apply old value
8f0c0000 lw t4, $0000(t8)	sh t2, $0000(t5), store byte in apply old value
10000018 beq zero, zero, $001000fc	go to store these results
8f0b0000 lw t3, $0000(t8)	addiu t5, t5, $0002, 1st scan for 2 bytes

8f190000 lw t9, $0000(t8)	lw t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lw t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lw t4, $0000(t2), extra scan current value
10000005 beq zero, zero, $00100094	go to store 2 bytes and increase by 2
8f0d0000 lw t5, $0000(t8)	lw t2, $0008(t8), apply old value
8f190000 lw t9, $0000(t8)	lwu t3, $0000(t5), 1st scan
8f0f0000 lw t7, $0000(t8)     lwu t3, $0004(t7), extra scans old value
8f0e0000 lw t6, $0000(t8)     lwu t4, $0000(t2), extra scan current value
8f0d0000 lw t5, $0000(t8)	lwu t2, $0008(t8), apply old value
8f0c0000 lw t4, $0000(t8)	sh t2, $0000(t5), store byte in apply old value
8f0b0000 lw t3, $0000(t8)	addiu t5, t5, $0002, 1st scan for 2 bytes

af190000 sw t9, $0000(t8)
af0f0000 sw t7, $0000(t8)
af0e0000 sw t6, $0000(t8)
af0d0000 sw t5, $0000(t8)
af0c0000 sw t4, $0000(t8)
03e00008 jr ra
af0b0000 sw t3, $0000(t8)

Things that are loaded:
lb t3, $0000(t5)
lb t3, $0004(t7)
lb t4, $0000(t2)
lb t2, $0008(t8)

lbu t3, $0000(t5)
lbu t3, $0004(t7)
lbu t4, $0000(t2)
lbu t2, $0008(t8)

lh t3, $0000(t5)
lh t3, $0004(t7)
lh t4, $0000(t2)
lh t2, $0008(t8)

lhu t3, $0000(t5)
lhu t3, $0004(t7)
lhu t4, $0000(t2)
lhu t2, $0008(t8)

lw t3, $0000(t5)
lw t3, $0004(t7)
lw t4, $0000(t2)
lw t2, $0008(t8)

lwu t3, $0000(t5)
lwu t3, $0004(t7)
lwu t4, $0000(t2)
lwu t2, $0008(t8)

sb t2, $0000(t5)
addiu t5, t5, $0001

sh t2, $0000(t5)
addiu t5, t5, $0002

sw t2, $0000(t5)
addiu t5, t5, $0004



lui t2, $vvvv	ori t2, t2, $vvvv		3c0a354a	1st scan value 1 and 2
bne t2, t3, $000ffe90		1st scan keep if exact value
beq t2, t3, $000ffe90		1st scan keep if the value is different
slt at, t2, t3			1st scan keep if value is greater than
slt at, t3, t2			1st scan keep if value is less than
beq at, zero, $000ffe90		1st scan branch for </> comparisons
lui at, $vvvv	ori at, at, $vvvv		3c013421	extra scans value
bnel t3, t4, $000ffee4		extra scans keep if the value didn't change
beql t3, t4, $000ffee4        extra scans keep if the value changed
slt at, t4, t3			extra scans keep if the value increased
slt at, t3, t4			extra scans keep if the value decreased
beql at, zero, $000ffee4	extra scans branch for the </> comparisons
sub t3, t4, t3			extra scans keep if the signed value increased by this much
subu t3, t4, t3			extra scans keep if the unsigned value increased by this much
sub t3, t3, t4			extra scans keep if the signed value decreased by this much
subu t3, t3, t4			extra scans keep if the unsigned value decreased by this much
bnel at, t3, $000ffee4		extra scans branch for the above 4

bnel t4, zero, $000ffee4	extra bit scans remove if bits aren't off
bnel t2, t4, $000ffee4		extra bit scans remove if bits aren't on

addu t7, at, t7			cycle through results up 1
subu t7, at, t7			cycle through results down 1

lw t5, $0004(t8)			get the address
lbu t5, $0008(t8)			get the 1 byte's value
lhu t5, $0008(t8)			get the 2 bytes' value
lwu t5, $0008(t8)			get the 4 bytes' value







offset locations for bits
sh 0, $0000(t8)		1st scan lui/ori
sh 0, $0004(t8)		extra scan 1st value lui/ori
sh 0, $0008(t8)		extra scan 2nd value lui/ori
sh 0, $000c(t8)		find address/value lui/ori
ASM
jr ra
sh zero, $0000(t8)	0000
lh t2, $0000(t8)		0001
ori t2, t2, $0001
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0002
ori t2, t2, $0002
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0004
ori t2, t2, $0004
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0008
ori t2, t2, $0008
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0010
ori t2, t2, $0010
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0020
ori t2, t2, $0020
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0040
ori t2, t2, $0040
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0080
ori t2, t2, $0080
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0100
ori t2, t2, $0100
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0200
ori t2, t2, $0200
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0400
ori t2, t2, $0400
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		0800
ori t2, t2, $0800
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		1000
ori t2, t2, $1000
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		2000
ori t2, t2, $2000
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		4000
ori t2, t2, $4000
jr ra
sh t2, $0000(t8)
lh t2, $0000(t8)		8000
ori t2, t2, $8000
jr ra
sh t2, $0000(t8)


ASM to select which of the 8 LUI/ORI to modify:
1000000e beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	1st scan lui
1000000c beq 0, 0,
100f???? 8719???? lh t9, $0002(t8)	1st scan ori
1000000a beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	1st scan 2nd lui
10000008 beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	1st scan 2nd ori
10000006 beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	extra scan lui
10000004 beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	extra scan ori
10000002 beq 0, 0,
100f???? 8719???? lh t9, $0000(t8)	get address/value lui
100f???? 8719???? lh t9, $0000(t8)	get address/value ori
3c0f000f lui t7, $000f		where to start changing the offsets.
35ef???? ori t7, t7, $????	where to start changing the offsets.
35ee00f0 ori t6, t7, $00f0	where to stop changing the offsets.
a5f90000 sh t9, $0000(t7)	store which of the 8 are being modified
25ef0010 addiu t7, t7, $0010  go up to change the next one
1400fffd bne 0, 0,

03e00008 jr ra








